 /**********************
 * Matthew Tanner
 * tannerm.onid.orst.edu
 * CS362
 * Assignment #3 cardtest1.c
 * Tests the zzzsmithycardplay function in dominion.c
 ***********************/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include "rngs.h"
#include "tests.h" 

void cardtest1(){

	struct gameState g;
	int players = 2;
	int k[10] = {adventurer, council_room, sea_hag, gardens, mine, remodel, smithy, village, baron, great_hall};
	int seed = 100;
	int res, player;
	int bonus = 0;

	//initialize game
	res = initializeGame(players, k, seed, &g);
	player = whoseTurn(&g);

	printf("Testing zzzsmithycardplay:\n");
	printf("Adding smithy card to hand\n");

	res = gainCard(smithy, &g, 2, player);

	printf("Expect 6 cards in hand, actual: %d\n", numHandCards(&g));
	printf("Playing smithy card\n");

	res = cardEffect(smithy, 0, 0, 0, &g, 5, &bonus);

	printf("Expect 8 cards in hand, actual: %d\n", numHandCards(&g));
	assert(numHandCards(&g) == 8);
}
